#!/bin/bash -ilex
#这里是部署脚本 netstat -ntulp |grep 9090
PID=$(netstat -ntulp |grep 9090 | awk '{print $7}'|awk  -F '/'  '{print $1}')
if [ -z $PID ]; then
        echo "process provider not exist"

else
        echo "process id: $PID"
        kill -9 ${PID}
        echo "process provider killed"
fi
git pull
mvn clean
mvn package
cd /root/java/xxxx/yuebaoyuan-server/target
nohup java -jar yuebaoyuan-server.jar &